package com.sicnu.comments.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName(value = "comments")
public class CommentsDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer commentId;
    private Integer resourceId;
    private Integer userId;
    private Integer parentCommentId;
    private Integer topLevelCommentId;
    private String commentContent;
    private String commentType;
    private Date createdAt;
    private Date updatedAt;

    @TableField(exist = false)
    private List<CommentVO> replies;
    @TableField(exist = false)
    private Integer likeCount;
}